%% Movie Creator.
CreateMovie = 1;
outputVideoFile = 'video.avi';
 
%% Set up the movie.
if (CreateMovie);
    writerObj = VideoWriter(outputVideoFile);
    writerObj.FrameRate = 5; % How many frames per second.
    open(writerObj); 
    
    videoFifID = figure;
end;